package org.gd.hellojaxb.privat24.paninfo;

import javax.xml.bind.annotation.*;

/**
 * @author User
 */
@XmlRootElement(name = "card")
@XmlAccessorType(XmlAccessType.FIELD)
public class PanInfoRequestCard {

    @XmlRootElement(name = "item")
    @XmlAccessorType(XmlAccessType.FIELD)
    private static final class Item {
        @XmlAttribute(name = "Pan")
        private String card;

        private Item() {
        }

        private Item(String card) {
            this.card = card;
        }

        public String getCard() {
            return card;
        }

        public void setCard(String card) {
            this.card = card;
        }
    }

    @XmlAttribute(name = "sid")
    private String prominSessionId;
    @XmlAttribute(name = "t")
    private final String type = "PanInfo";
    @XmlElement(name = "i")
    private final Item card = new Item();


    private PanInfoRequestCard() {
    }

    public PanInfoRequestCard(String prominSessionId, String card) {
        this();
        this.prominSessionId = prominSessionId;
        setCard(card);
    }

    public void setProminSessionId(String prominSessionId) {
        this.prominSessionId = prominSessionId;
    }

    public void setCard(String card) {
        this.card.setCard(card);
    }

    public String getProminSessionId() {
        return prominSessionId;
    }

    public String getType() {
        return type;
    }

    public String getCard() {
        return card.getCard();
    }
}
